import Vue from 'vue'
import Router from 'vue-router'
import Login from "@/components/Login";
import Home from "@/components/Home";
import UserEdit from "@/components/UserEdit";

Vue.use(Router)

export default new Router({
  routes: [
    //员工编辑页面
    {
      path: '/edit/:id',  //需要传递ID参数
      name: 'UserEdit',
      component: UserEdit
    },

    //登陆页面
    {
      path: '/',
      name: 'Login',
      component: Login
    },

    //登陆成功跳转列表页面
    {
      path: '/home',
      name: 'Home',
      component: Home
    }
  ],
  mode:'history'
})
